<layout name="mun" />
    <div class="operation_user clearfix">
        <div class="link fl"><a href="#">商城</a><span>&gt;&gt;</span><a href="#">分类管理</a><span>&gt;&gt;</span>分类管理</div>
        <div class="link fr">
            <a href="#" class="icon icon_i">首页</a><span></span>欢迎您！<span>Admin</span><a href="#" class="icon icon_e">退出</a>
        </div>
    </div>
    <div class="content clearfix">
        <div class="main">
            <!--右侧内容-->
            <div class="cont">
                <div class="title">分类管理</div>
                <div class="details">
                    <div class="details_operation clearfix">
                        <div class="bui_select">
                        	<a href="{:U('AddSortlist/index')}" class="btn btn-primary">添&nbsp;&nbsp;加</a>
                        </div>
                        <div class="fr">
                            <form class="form-inline">
							  <div class="form-group">
							    <label for="userName">用户名</label>
							    <input type="text" class="form-control" id="userName" placeholder="用户名">
							  </div>
							  <button type="submit" class="btn btn-primary">搜索</button>
							</form>
                        </div>
                    </div>
                    <!--表格-->
                    <table class="table table-striped">
                        <thead>
                            <tr>
                                <th>编号</th>
                                <th>用户名</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                        <volist name="Rs" id="vo">
                        <tr>
                        <td><input type="checkbox" id="c1" class="check"><label for="c1" class="label"><span style="color: #080808">{$vo.id}</span></label></td>
                        <td>{$vo.cname}</td>
                        
                        <td><a href="{:U('Sortlist/xiugai?id='.$vo[\"id\"])}" class="btn btn-primary">修改</a>
                        		<button name="Dell" value="{$vo.id}" class="btn btn-danger col-sm-offset-1">删除</button></td>
                       </tr>
                        </volist>
                          
                        </tbody>
                    </table>
                    <div class="fr">
                    	<nav>
						  <ul class="pagination">
						    <li>
						      <a href="#" aria-label="Previous">
						        <span aria-hidden="true">&laquo;</span>
						      </a>
						    </li>
						    <li><a href="#">1</a></li>
						    <li><a href="#">2</a></li>
						    <li><a href="#">3</a></li>
						    <li><a href="#">4</a></li>
						    <li><a href="#">5</a></li>
						    <li>
						      <a href="#" aria-label="Next">
						        <span aria-hidden="true">&raquo;</span>
						      </a>
						    </li>
						  </ul>
						</nav>
                    </div>
                </div>
            </div>
        </div>
<SCRIPT src="__JS__jquery-1.9.1.min.js" type="text/javascript"></SCRIPT>
<script type="text/javascript">
$(function(){
	$("button[name=Dell]").click(function(){
		$.post("{:U('Sortlist/Dell')}",{
			id:$(this).val()
		},function(data){
			if(data.status == 0){
				alert(data.info);
			}else{
				alert(data.info);
				location.href=data.url; 
			}
		});
		});
});
        </script>